\chapter{Overall Description}
\label{cap:Overall Description}

\section{Product perspective}
SWIMv2-swKnights is supposed to be a self-contained project. The only non-self-contained  aspect is introduced by the fact that you're expected to use a web browser in order to use the application. The possibility to be extended by a mobile application is another aspect that made the SWIMv2 less self-contained.

\vspace{2mm}
\textbf{User interfaces}
\newline
The principal user interface, which will be implemented in this project, is a web browser accessible application.
This application will provide a friends research engine, a menu grouping and a set of functionalities, which will be described more in detail later in this document, such as: personal profile access, private mail box and other tools which provide the possibility to modify inserted data, to get some help about the app and a friends adviser. 
\\
\noindent
Registered users will be able to access their interfaces and to expolit functionalities just quoted. Concerning the guest users they will be given reduced functionalities: they will be able to access the research interface and to visualize registered users' public profile according to their privacy settings.
\begin{comment}
L'interfaccia utente principale, ovvero quella che sar?/span> implementata in questo progetto, ?una web application accessibile da browser.
Preveder?/span> un motore di ricerca per cercare amici, avremo un men?/span> che raggrupper?/span> una serie di funzionalit?/span> che saranno descritte pi?/span> in dettaglio nelle prossime sezioni, come: accesso al profilo personale, casella messaggi privati, impostazioni le quali prevedono la possibilit?/span> di modificare i dati precedentemente inseriti, un tool di help, e il suggeritore di amici.
\\
\noindent
L'utente registrato avr?/span> accesso alle interfaccie che prevedono le funzionalit?/span> appena citate, per quanto riguarda l'utente ospite le funzionalit?/span> saranno ridotte ovvero avr?/span> solo accesso all'interfaccia di ricerca e di visualizzazione  dei profili pubblici degli utenti registrati secondo le loro impostazioni di privacy.
\\
\noindent
L'amministratore oltre all'interfaccia visibile da un utente registrato avr?/span> accesso a una particolare interfaccia nella quale potr?/span> utilizzare tutte le funzioni a lui dedicate anch'esse spiegate in seguito.
\end{comment}

\vspace{2mm}
\textbf{Software interfaces}
\newline
\noindent
Software interfaces are JBoss and the MySQL DBMS. JBoss is used as application server in order to make java web application run, MySQL instead interfaces the whole system with the database by the SQL query execution.

\vspace{2mm}
\textbf{Operations}
\newline
\noindent
Generally in the application every operation is started by the user who wants to do it. The only exception is when the system provides advices to add new friends.
Backup and other security operations are handled by the DBMS and by the system admin, outside the application segment.


\begin{comment}operazioni iniziate dall'utente
:ricerche, messaggi privati, 
operazioni iniziate dal sistema
:suggerimento di amici
operazioni di back-up delegate al DBMS
TODO TODO TODO: aggiusta
\end{comment}

\section{Product functions}
Here we are about to list and briefly explain all the use cases of the system; Note that in some cases a use case here listed could include more use cases which are an extension or just a more detailed part of the first one. After the list we present an UML use case diagram which should give an intuitive view of the system functionalities. Later on in this document we'll provide a much more detailed description of all these use cases.% \\TODO EDO QUA METTI IL RIFERIMENTO ALLA SEZIONE, SONO LE 11.33 E NON HO VOGLIA DI CERCARE COME SI FA xd TU SEI CAPACE LOL BY CLOD

\begin{figure}
\centerline{\includegraphics[scale=0.45]{images/UseCase}}
\end{figure}

\subsection*{Use Cases List}
\begin{itemize}
\item \emph{Research}: Look for friends in the system according to the research key \\inserted by the user.
\item \emph{User Registration}: No registered users should be able to register in the web site.
\item \emph{Access handling}: In order to use the functionalities of the system, a user has to perform a login. Once he's logged in user can decide to log off, the system gives him this possibility.
\item \emph{Adding a friend}: A registered user should be able to add a friends in his circle. System has to suggest friends to all the registered users.
\item \emph{Adding abilities}:Users can ask admins to add new abilities which were not mentioned before in the system. Admins will receive those requests and decide to approve and then add this kind of abilities.
\item \emph{Sent private messages}: Registered user can send messages to each other, those messages are private. An unregistered user can send messages too to registered one, but he is not able to receive any one.
\item \emph{Change founder}: A founder can decide to nominate another founder.
\item \emph{Ban}: Admins and founder can ban users who didn't respect the social network laws.
\item \emph{Modify profile}: Users can modify their profile, for example change their personal data and other things.
\item \emph{Delete account}: A user should be able to delete his account from the social network if he wants to. Deleting an account means to lose every information about the user who performed this task.
\item \emph{Ask for help}: By sending a Help Request message, a user can ask for help to another one.
\item \emph{Leave a feedback}: When a user is helped he can leave a feedback for the received help.
\end{itemize}
 \newpage
\section{User characteristics}
 
% utenti e amministratore: chi usa l'app e perch? NO! chi ?e cosa sa
\vspace{2mm}
\noindent
\textbf{Unregistered User}: Unregistered user doesn't necessarily have particular ability. The only requirement should have a minimal familiarity in social networking.
This kind of user is generally interested in navigate the web site looking for help or, in some cases, or just for pure curiosity.

\vspace{2mm}
\noindent
\textbf{Registered User}:
This kind of user can have any level of education, (s)he generally has at least one ability but in some cases (s)he can have no ability at all and use the web-app only to look for help.
In case a registered user has one or more ability, (s)he further will use the site to give help to other user registered or not.

\vspace{2mm}
\noindent
\textbf{Administrator}:
An administrator can have any level of education, but has to have some common sense and experience with social networks.
(S)he has to know what can be considered and ability and what can't.
Also (s)he has  to know SWIM rules in order to eventually ban user who violate them.

\vspace{2mm}
\noindent
\textbf{Founder}:
Differently from administrator, the founder is supposed to be a much more expert user with experience in computer science and at least basic experience in social networking.
This person should be a reliable one who is involved constantly in monitoring the site. 
\section{Constraints}
\begin{comment}
I principali constraints riguardano la sicurezza e a tutela della privacy degli utenti:
in generale non deve essere possibile accedere a dati senza rispettare i privacy settings dell'utente stesso. In nessun caso deve essere possibile accedere alla password dell'utente, che deve avere il livello di sicurezza massimo possibile, almeno per quanto riguarda il database del server.
Altre constraints riguardano la necessit?/span> di accessi simultanei e paralleli di pi?/span> utenti al sistema, che deve poter reggere un discreto carico di utilizzo senza rallentare in maniera eccessiva la fruizione dei contenuti.
Il sistema non ?critico, perch?/span> un errore non causa alcun danno fisico, matertiale o economico. Errori del databasel, seppure da evitare, non causano problemi gravi se riguardanti il singolo utente. Tuttavia la consistenza generale del database ?da considerarsi abbastanza importante, in quanto una massicicia perdita di dati, o altro tipo di inconsistenza, potrebbe portare al collasso completo del sistema o a un lavoro decisamente pesante dell'amministratore di sistema.
Il sistema dovrebbe essere in grado di girare in generale 24/7, tuttiavia non ?causa di gravi problematiche l'impossibilit?/span> di accedere al sito per periodi brevi e limitati durante tutto il lifecycle del software. L'entit?/span> delle interruzioni deve essere il meno frequente possibile, in particolare dovrebbe essere auspicabile ridurla solo a casi di forza maggiore (ad esempio cambio di hardware o perdita della connettivit?/span>), relegando al minimo l'invasivit?/span> dell'ordinaria manutenzione.
Requisito di fondamentale importanza deve essere l'espandibilit?/span> e la modularit?/span> del software, e quindi della buona qualit?/span> del codice, vista la natura dinamica e evolutiva del tipico ambito applicativo, che deve poter evolvere per seguire le necessit?/span> degli utenti, in particolare deve essere espandibile in ottica non solo di web application, ma anche in ottica mobile application.
Tutto il sistema deve essere per forza sviluppato utilizzando la tecnologia Java EE, utilizzando come application server JBoss.
\end{comment}
System main constraints involve user's security and privacy, as a general rule it should not be possible access data without having permission, all accesses have to be in respect of user privacy settings.
In no case should be possible see users password. It has to have the maximum level of security, at least for what concern the server database.
\\
\noindent
Other constraints involve the needing of several accesses at the same time, hence the system has to be able to support a good amount of users connected to it, without significantly slow.
\\
\noindent
Our system is not critical because an error won't cause any physical nor economical and not even material damage. Database error, that are sure enough no good, will not cause any serious problem if they concern a single user. Anyway, database consistency is quite important, given that a massive lose of data (or any other kind of inconsistency) can lead to the system break-down.
\\
\noindent
One of the most important requirement is the ability of the system to be easily expanded. This implies the need of good code (well written code). All this because the system has to be able to evolve according to users needing and also because it should be possible to write a mobile application for our system.
\\
\noindent
The whole system have to be realized using Java EE technology and JBoss as server application.
